package com.attilax.rest;

import java.util.List;
import java.util.Map;

import com.attilax.db.DbServiceV4qb9;
import com.attilax.ioc.Ioc4wash;
import com.attilax.net.URLEncoder;
import com.attilax.net.requestImp;
import com.attilax.net.urlEncode;
import com.attilax.web.UrlX;
import com.attilax.web.responseImp;

public class restTest {

	public static void main(String[] args) {
		
		
		int i=5;
	boolean b=	isBaseDateType(i);
		int i2=6;
		
		boolean b2=isBaseDateType(i2);
		String s="a";
		boolean b3=isBaseDateType(s);
	//	if( isBaseDateType(s)  )
		//insert();
		DbServiceV4qb9 dbc=Ioc4wash.getBean(DbServiceV4qb9.class);
		String sql = "  insert `常用洗衣网点`(`工号`,`网点名称`)value('@uid@','@add@')   ";
		sql="call changyongwangdian_addNlist('123','新地址23')";
	//	int r=dbc.executeUpdate(sql);
		List<Map> r=dbc.executeQuery(sql);
		boolean b4=isBaseDateType(r);
		System.out.println("r："+r);
		
		
	}

	

	private static void insert() {
		responseImp resImp=new responseImp();
		requestImp ri=new requestImp();
	 	ri.setParam("iocFac", "com.attilax.ioc.Ioc4wash"); 
		ri.setParam("m", "com.attilax.db.DbServiceV4qb9.executeUpdate");
		ri.setParam("p1_type", "s");
		String sql = "  insert `常用洗衣网点`(工号,网点名称)value('@uid@','@add@')   ";
		ri.setParam("p1", sql);
	 	new AjaxJsbridge_HttpparamMode_servlet().service(ri, resImp);
	}

	private static void query() {
		String s="call `sp_查询用户`('mer')";
		s="insert l_notice(content)values('tttt')";
		System.out.println( URLEncoder.encode(s));
		
		System.setProperty("prj", "game");
		System.setProperty("other_cfgfile", "cfg_game2.properties");
		System.out.println("23dd33d22d11dddd4dd33dd6");
			responseImp resImp=new responseImp();
		requestImp ri=new requestImp();
	 	ri.setParam("iocFac", "com.attilax.ioc.Ioc4wash"); 
		ri.setParam("m", "com.attilax.db.DbServiceV4qb9.executeQuery");
		ri.setParam("p1_type", "s");
		ri.setParam("p1", "select * from s_member limit 10");
	 	new AjaxJsbridge_HttpparamMode_servlet().service(ri, resImp);
	 	
	 	String decode="%2520insert%2520%2560%25E5%25B8%25B8%25E7%2594%25A8%25E6%25B4%2597%25E8%25A1%25A3%25E7%25BD%2591%25E7%2582%25B9%2560(%25E5%25B7%25A5%25E5%258F%25B7%252C%25E7%25BD%2591%25E7%2582%25B9%25E5%2590%258D%25E7%25A7%25B0)value(%27123%27%252C%27%25E5%25AE%259E%25E9%2599%2585%25E5%259C%25B0%25E5%259D%2580%27)";
	 	decode=UrlX.decode(decode);
System.out.println(decode);		
		decode=UrlX.decode(decode);
				System.out.println(decode);
	}

}
